# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Metastore.V1beta.Model.MetadataImport do
  @moduledoc """
  A metastore resource that imports metadata.

  ## Attributes

  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the metadata import was started.
  *   `databaseDump` (*type:* `GoogleApi.Metastore.V1beta.Model.DatabaseDump.t`, *default:* `nil`) - Immutable. A database dump from a pre-existing metastore's database.
  *   `description` (*type:* `String.t`, *default:* `nil`) - Optional. The description of the metadata import.
  *   `endTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the metadata import finished.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Identifier. The relative resource name of the metadata import, of the form:projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}.
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. The current state of the metadata import.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the metadata import was last updated.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :createTime => DateTime.t() | nil,
          :databaseDump => GoogleApi.Metastore.V1beta.Model.DatabaseDump.t() | nil,
          :description => String.t() | nil,
          :endTime => DateTime.t() | nil,
          :name => String.t() | nil,
          :state => String.t() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:createTime, as: DateTime)
  field(:databaseDump, as: GoogleApi.Metastore.V1beta.Model.DatabaseDump)
  field(:description)
  field(:endTime, as: DateTime)
  field(:name)
  field(:state)
  field(:updateTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.Metastore.V1beta.Model.MetadataImport do
  def decode(value, options) do
    GoogleApi.Metastore.V1beta.Model.MetadataImport.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Metastore.V1beta.Model.MetadataImport do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
